﻿@using System.Collections.Specialized
@model QuestionsAnswers.UI.Models.Course

@{
    ViewBag.Title = "Create";
    ViewBag.memberType = new SelectList(new List<String> {"Participant", "Owner"});
}

<h2>Create</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Course</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>
        <div class="editor-label">
        <label for ="emails">Enter Email Adresses of Users to Invite (One per line)</label>
        </div>
        <div class="editor-field">
        @Html.TextArea("emails","",10,50,new{id = "emails"})
        </div>
         <div class="editor-label">
        <label for ="memberType">Select Member Type for Invitees</label>
        </div>
        <div class="editor-field">
  
        @Html.RadioButton("memberType","Owner")Owner
        <br/>
        @Html.RadioButton("memberType","Participant",true)Participant

        </div>
        
        <div class="editor-label">
            <label for="NumberofRequiredQuestionsPerUser">Enter the number of Questions each member of the course must ask</label>
        </div>
        <div class="editor-field">
        
            @Html.TextBoxFor(model => model.NumberofRequiredQuestionsPerUser, new {@Value = "0"})
            @Html.ValidationMessageFor(model => model.NumberofRequiredQuestionsPerUser)
        </div>
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
